package thinking.java.initalization.and.clean.up;

import java.util.Arrays;
import java.util.Random;

/**
 * @author GaoFeng
 * @date 2020/1/3 11:12
 */
public class ArrayClassObj {

    public static void main(String[] args) {
        Random random = new Random(47);
        Integer[] a = new Integer[random.nextInt(20)];
        System.out.println("length of a = " + a.length);

        for (int i = 0; i < a.length;i++) {
            a[i] = random.nextInt(500);
        }

        System.out.println(Arrays.toString(a));
    }

    // 随机初始化
}
